package com.agriculture.competition.mapper;

import com.agriculture.competition.domain.JaCompetitionUser;
import com.agriculture.competition.domain.vo.JaCompetitionScoreVo;
import com.agriculture.competition.domain.vo.JaCompetitionUserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 参赛人员Mapper接口
 *
 * @author agriculture
 * @date 2024-11-12
 */
public interface JaCompetitionUserMapper {
    /**
     * 查询参赛人员
     *
     * @param id 参赛人员主键
     * @return 参赛人员
     */
    public JaCompetitionUser selectJaCompetitionUserById(Long id);

    /**
     * 查询参赛人员列表
     *
     * @param jaCompetitionUser 参赛人员
     * @return 参赛人员集合
     */
    public List<JaCompetitionUser> selectJaCompetitionUserList(JaCompetitionUser jaCompetitionUser);

    /**
     * 新增参赛人员
     *
     * @param jaCompetitionUser 参赛人员
     * @return 结果
     */
    public int insertJaCompetitionUser(JaCompetitionUser jaCompetitionUser);

    /**
     * 修改参赛人员
     *
     * @param jaCompetitionUser 参赛人员
     * @return 结果
     */
    public int updateJaCompetitionUser(JaCompetitionUser jaCompetitionUser);

    /**
     * 删除参赛人员
     *
     * @param id 参赛人员主键
     * @return 结果
     */
    public int deleteJaCompetitionUserById(Long id);

    /**
     * 批量删除参赛人员
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteJaCompetitionUserByIds(Long[] ids);


    public List<JaCompetitionUser> queryCompetitionUserByCompetitionId(Long id);


    public List<JaCompetitionUserVo> queryCompetitionUsers(Long competitionId);


    public List<JaCompetitionUserVo> queryCompetitionByUser(@Param("competitionIds") List<Long> competitionIds);

    public Map queryUserById(Long userId);


    public List<JaCompetitionUserVo> queryCompetitionUserScore(JaCompetitionScoreVo jaCompetitionScoreVo);


    public List<JaCompetitionUserVo> queryUserCount();

}
